-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-2852: Provide a way to customize a transactionIdSuffix #2930
GH-2852: Provide a way to customize a transactionIdSuffix #2930
Conversation
e79d724
to
4e8237d
Compare
@stillya @Wzy19930507 It looks like we can use this PR instead of the previous one since this contains all the commits from the previous one (except for the docs commit). If that is the case, can we close the previous PR? |
Checkstyle failures in the PR build: https://github.com/spring-projects/spring-kafka/actions/runs/7160082920 |
...ng-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionSuffixManager.java
Outdated
Show resolved
Hide resolved
@stillya The gist of your change from a first-pass review I did is the following. The Some quick comments. The When Thanks! |
@sobychacko Sure, let’s continue in this PR, @stillya I’m sorry misunderstood your meaning. |
Yes, you're absolutely right.
I agree that
When maxCache is zero, so caching is disabled, then we go here and just increment the counter as before. |
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionSuffixManager.java
Outdated
Show resolved
Hide resolved
|
spring-kafka/src/main/java/org/springframework/kafka/core/TransactionSuffixManager.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/TransactionSuffixManager.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionSuffixManager.java
Outdated
Show resolved
Hide resolved
@stillya, The PR CI build keeps failing due to some test failure. Could you take a look? https://github.com/spring-projects/spring-kafka/actions/runs/7186689052 |
Yeah, sorry, broke one test by reverting old code. Fixed, now everything should pass. |
...ka/src/test/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategyTests.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, find some review from me.
In general looks good, but there are a couple simple concerns yet.
Thanks
spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc
Outdated
Show resolved
Hide resolved
spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
Show resolved
Hide resolved
...g-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/NoProducerAvailableException.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/NoProducerAvailableException.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/TransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/TransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/test/java/org/springframework/kafka/core/DefaultKafkaProducerFactoryTests.java
Outdated
Show resolved
Hide resolved
FYI, we have pushed this change to the next Thanks |
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
Show resolved
Hide resolved
spring-kafka/src/test/java/org/springframework/kafka/core/DefaultKafkaProducerFactoryTests.java
Show resolved
Hide resolved
...g-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc
Outdated
Show resolved
Hide resolved
spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc
Outdated
Show resolved
Hide resolved
@stillya , please, rebase your branch to the latest Then we will start looking into your change to incorporate it into a new version. Thanks |
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
Show resolved
Hide resolved
...g-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
...g-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategy.java
Show resolved
Hide resolved
0bf30c2
to
ccedad6
Compare
ccedad6
to
5e71cf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, consider to update copyright of all the affected classes to the current year.
...g-kafka/src/main/java/org/springframework/kafka/core/DefaultTransactionIdSuffixStrategy.java
Outdated
Show resolved
Hide resolved
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
Show resolved
Hide resolved
1e403d4
to
8277995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Artem! I will take a look and merge it today. |
@stillya @Wzy19930507 Thank you for this significant PR contribution. It is now merged upstream. |
Introduce a new
TransactionSuffixManager
interface withDefaultTransactionSuffixManager
implementation to restricttransaction.id
in range for existing PRResolves #2852